import os
import random


def write_a_file():
    file = open('gushi.txt', 'w', encoding='UTF-8')
    # file.write('春江烟雨映楼台\n万种风情次第开\n劝君且赏花一朵\n再叹此生不枉来')
    file.writelines('春江烟雨映楼台\n')
    file.writelines('万种风情次第开\n')
    file.writelines('劝君且赏花一朵\n再叹此生不枉来')
    file.close()


def copy_a_file():
    file = open('gushi.txt', 'r', encoding='UTF-8')
    string = file.read()
    print(string)
    file.close()
    copy_file = open('copy.txt', 'w', encoding='UTF-8')
    copy_file.write(string)
    copy_file.close()


# write_a_file()
# copy_a_file()